function [varValue] = variance2(A)
   [m,n]= size(A);
   meanV = mean(mean(A));
   sum = 0;
   for i = 1:m
       for j = 1:n;
         sum = sum + (double(A(i,j))-meanV)^2;
       end;
   end;
   varValue = sum/(m*n);
end

